   <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>招聘新增简历</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/metro-red/easyui.css">
</head>
<body>
<style type="text/css">
ul{
	list-style: none;
}
ul li{
	margin-top:20px;
	color:#6E6E6E;
	font-size:13px;
}
.insert{
	width:900px;
	height:500px;
	margin:auto;
}
.insert-titles{
	font-size:18px;
	color:#30B399;
	width:900px;
	height:30px;
	text-align:center;
	margin:10px auto;
	line-height:30px;
	background-color:#F4F4F4;
}
.first-insert{
		width:400px;
		float:left;
		height:300px;
		margin:10px 40px;
}
.recruit-insert{
		width:900px;
		height:300px;
		display: block;
}
.span-text{
		font-size:13px;
		color:#777777;
	    margin-top:10px;
	}
.third-insert{
		width:200px;
		height:30px;
		margin:40px auto;
}
.insertreturn{
		width:60px;
		height:25px;
		color:white;
		border:none;
		float:left;
		cursor:pointer;
}
.insertsave{
		width:60px;
		height:25px;
		color:white;
		border:none;
		float:right;
		cursor:pointer;
}
.icon-insert-fanhui{
		padding-left: 20px;
		background:url('static/easyui/themes/icons/fanhui.png') no-repeat 5% 50%;
		background-color:#EC971F;
}
.icon-insert-baocun{
		padding-left: 20px;
		background:url('static/easyui/themes/icons/baocun.png') no-repeat 5% 50%;
		background-color:#13826B;
}
.insert-right{
		width:400px;
		height:300px;
		float:right;
		margin:10px -50px;
}
.first-insert ul li,.insert-right ul li{
		margin-top:20px;
}
#biotime{
		width:200px;
}
</style>
<script type="text/javascript">
	$(function(){
		//新增界面中确定按钮
		$("#insertqueding").click(function(){
			//姓名
			var reasyname = $("#reasyname").val();
			//年龄
			var reasyage = $("#reasyage").val();
			//性别
			var reasysex = $("#reasysex").val();
			//学历
			var reasyacademic = $("#reasyacademic").val();
			//邮箱
			var reasyemail = $("#reasyemail").val();
			//出生年月
			var reasybirthday = $('#reasybirthday').datebox('getValue');
			//手机号码
			var reasyphone = $("#reasyphone").val();
			//应聘职位
			var position_id = $("#position_id").val();
			//家庭住址
			var reasyadress = $("#reasyadress").val();
			//添加备注
			var reasyremark = $("#reasyremark").val();
			//添加属于哪个招聘计划申请
			var rapplyid = $("#rapplyid").val();
			//新增计划面试时间
			var reasytime = $("#reasytime").val();

			if (reasyname==null || reasyname=="null" || reasyname=="") {
				alert("请输入姓名");
			}else if(reasyage==null || reasyage=="null" || reasyage==""){
				alert("请输入年龄");
			}else if(reasysex==null || reasysex=="null" || reasysex==""){
				alert("请输入性别");
			}  else if(reasyemail==null || reasyemail=="null" || reasyemail==""){
				alert("请输入邮箱");
			} else if(reasyphone==null || reasyphone=="null" || reasyphone==""){
				alert("请输入手机号码");
			} else if(position_id==null || position_id=="null" || position_id==""){
				alert("请输入应聘职位");
			}else if(rapplyid==null || rapplyid=="null" || rapplyid==""){
				alert("请输入添加招聘计划");
			}else if(reasyacademic==null || reasyacademic=="null" || reasyacademic==""){
				alert("请输入学历");
			}else if(reasybirthday==null || reasybirthday=="null" || reasybirthday==""){
				alert("请输入出生年月");
			} else if(reasyadress==null || reasyadress=="null" || reasyadress==""){
				alert("请输家庭住址");
			}else {
				$.ajax({
					url:"recruitinserts", 
					type:"post",
					data:{
						"reasyname":reasyname,
						"reasyage":reasyage,
						"reasysex":reasysex,
						"reasyacademic":reasyacademic,
						"rapplyid":rapplyid,
						"reasyemail":reasyemail,
						"reasybirthday":reasybirthday,
					 	"reasyphone":reasyphone,
						"position_id":position_id,
						"reasyadress":reasyadress,
						"reasyremark":reasyremark,
						"reasytime":reasytime
						},
					success:function(data){
						
					}
				})
				$("#content-admin").panel('open').panel('refresh','recruitbiographical');
				$("#recruitinsert").window("close");	
			}
		})	
		//点击返回按钮
		$("#insertreturn").click(function(){
			add("recruitbiographical");
		});
		//招聘职位
		$('#position_name').combogrid({
	        panelWidth:200,
	        url:'select_zhiweiKuang',
	        singleSelect:true,
	        idField:'position_name',
	        treeField:'position_name',
	        columns:[[
	        	{field:'sortable',title:'#',width:35,align:'center'},
	        	{field:'position_id',hidden:true},
	            {field:'position_name',title:'招聘职位',width:160,align:'center'}
	        ]],
	        onClickRow:function(rowIndex, rowData){
	    		$("#position_id").val(rowData['position_id']);
	    	}
	});
		//招聘所属申请计划
		$('#rapplyname').combogrid({
	        panelWidth:200,
	        url:'select_apply',
	        singleSelect:true,
	        idField:'rapplyname',
	        treeField:'rapplyname',
	        columns:[[
	        	{field:'sortable',title:'#',width:35,align:'center'},
	        	{field:'rapplyid',hidden:true},
	            {field:'rapplyname',title:'招聘所属计划',width:160,align:'center'}
	        ]],
	        onClickRow:function(rowIndex, rowData){
	    		$("#rapplyid").val(rowData['rapplyid']);
	    	}
	});
});
	function add(text){   
		$("#content-admin").panel({
			href:text
		})
	}
</script>
		<div class="insert" id="recruitinsert">
		  <div class="insert-titles">新增简历</div>
		  <div class="recruit-insert">
			<div class="first-insert">
			<input type="hidden" id="rapplyid">
			 <ul style="width:400px;height:280px;margin:30px auto;">
			 	<li><span>姓名：</span><input type="text" id="reasyname" style="color:#777777;width:220px;height:18px;"></li>
				<li><span>年龄：</span><input type="text" id="reasyage" style="color:#777777;width:220px;height:18px;"></li>
				<li><span>性别：</span>
				<select id="reasysex" style="color:#777777;width:220px;height:22px;">
					<option>--请选择--</option>
					<option>男</option>
					<option>女</option>
					</select>
				</li>
				<li>
				<span>学历：</span>
				<select id="reasyacademic" style="color:#777777;width:220px;height:22px;">
					<option>--请选择学历--</option>
					<option>高中以下</option>
					<option>高中</option>
					<option>本科</option>
					<option>专科</option>
					<option>研究生</option>
					<option>研究生以上</option>
				</select></li>
				<li><span>邮箱：</span><input type="text" id="reasyemail" style="color:#777777;width:220px;height:18px;"></li>
				<li><span style="margin-left:-25px;">所属计划：</span><input type="text" id="rapplyname" style="color:#777777;width:223px;height:22px;"></li>
			</ul>		
	</div>
		<div class="insert-right">
			<input type="hidden" id="position_id">
			<ul style="width:400px;height:280px;margin:30px auto;">
				<li><span>出生年月：</span><input type="text" id="reasybirthday" class="easyui-datebox" required="required" style="color:#777777;width:223px;height:22px;"></li>
				<li><span>手机号码：</span><input type="text" id="reasyphone" style="color:#777777;width:220px;height:18px;"></li>
				<li><span>应聘职位：</span><input type="text" id="position_name" style="color:#777777;width:223px;height:22px;"></li>
				<li><span>家庭住址：</span><input type="text" id="reasyadress" style="color:#777777;width:220px;height:18px;"></li>
				<li><span>添加备注：</span><input type="text" id="reasyremark" style="color:#777777;width:220px;height:18px;"></li>
				<li><span style="margin-left:-25px;">计划面试时间：</span><input type="text" class="easyui-datebox" required="required" id="reasytime" style="color:#777777;width:223px;height:22px;"></li>
			</ul>
		</div> 
	</div>
			<div class="third-insert">
				<button id="insertreturn" class="insertreturn icon-insert-fanhui">返回</button>
				<button id="insertqueding" class="insertsave icon-insert-baocun">确定</button>
		 </div>	
</div>
</body>
</html>